









// THIS FILE IS OBSOLETE











///*
// * To change this template, choose Tools | Templates
// * and open the template in the editor.
// */
//package edu.wpi.first.wpilibj.templates.subsystems;
//
//import edu.wpi.first.wpilibj.AnalogChannel;
//import edu.wpi.first.wpilibj.Victor;
//import edu.wpi.first.wpilibj.command.Subsystem;
//
///**
// *
// * @author MattKahn
// */
//public class LifterSubsystem extends Subsystem {
//    // Put methods for controlling this subsystem
//    // here. Call these from Commands.
//
//    private LifterID m_Lifter;
//    protected Victor actuator = null;
//    protected AnalogChannel lifterPosition = null;
//    //protected PIDController lifterControl = null;
//    public LifterSubsystem(final LifterID lifter, int pwmPort, int potPort) {
//        System.out.println("Constructing LifterSubsystem " + lifter.value + " PWM  "  +  pwmPort + " Pot " +potPort);
//        m_Lifter = lifter;
//        actuator = new Victor(pwmPort);
//        lifterPosition = new AnalogChannel(potPort);
//        
//    }
//
//
//    // Lifter State Enumeration
//    public static class LifterState {
//    }
//
//    public void initDefaultCommand() {
//        // Set the default command for a subsystem here.
//        //setDefaultCommand(new MySpecialCommand());
//    }
//    
//    public double getPosition() {
//        double position = lifterPosition.getAverageValue();
//        System.out.println("Lifter " + m_Lifter + " @ " + position );
//        return position;
//    }
//    
//    public void move(double speed) { // anywhere in the range 1 to -1
//     
//        int raw = (int)((127.0 * speed) + 127.0);
//        actuator.setRaw(raw);
//        double pos = lifterPosition.getAverageValue();
//        int MaxTickValue = 750;
//        int MinTickValue = 650;
//        
//        if (pos >= MaxTickValue) {
//            stop();
//        } else if (pos <= MinTickValue) {
//            stop();
//        }
//    }
//    
//    public void stop() {
//        actuator.stopMotor();
//        lifterPosition.getAverageValue();
//     }
//}
